/*
 * File:    SoapRegistryEntry.java
 * Created: 05-Dec-2007
 * Version: $Id$
 *
 * COPYRIGHT (C) 2007, Bitgate Software, LLC.  All Rights Reserved.
 * software@bitgatesoftware.com
 */

package com.bitgate.util.soap;

/**
 * This is a container class that is used by the {@link SoapRegistry}, which stores the class name, session requirement,
 * and class object.
 * 
 * @author kenji
 * @since 0.7.0
 */
public class SoapRegistryEntry
{
	private final boolean requireSession;
	private final Class<?> soapClass;
	
	/**
	 * Constructor.
	 * 
	 * @param requireSession <code>boolean</code> indicating if session objects are required.
	 * @param soapClass <code>Class&lt;?&gt;</code> containing the class that is used for the SOAP request/response.
	 */
	public SoapRegistryEntry(boolean requireSession, Class<?> soapClass)
	{
		this.requireSession = requireSession;
		this.soapClass = soapClass;
	}
	
	/**
	 * Returns whether or not a session is required.
	 * 
	 * @return <code>true</code> if session required, <code>false</code> otherwise.
	 */
	public boolean isRequireSession() 
	{
		return requireSession;
	}
	
	/**
	 * Returns the SOAP class for this object.
	 * 
	 * @return <code>Class&lt;?&gt;</code> object that was stored.
	 */
	public Class<?> getSoapClass()
	{
		return soapClass;
	}
}